package com.knowswift.issues.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.knowswift.common.bean.issue.po.MonitorRecord;
import com.knowswift.common.bean.issue.vo.MonitorAlertCountParam;
import com.knowswift.common.bean.issue.vo.MonitorAlertCountVO;
import com.knowswift.common.common.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MonitorRecordMapper extends BaseMapper<MonitorRecord> {
    List<MonitorAlertCountVO> alertCountByYear(@Param("param") MonitorAlertCountParam param, @Param("moduleProjects") List<String> moduleProjects);

    List<MonitorAlertCountVO> alertCountByMonth(@Param("param") MonitorAlertCountParam param, @Param("moduleProjects") List<String> moduleProjects);

    List<MonitorAlertCountVO> alertCountByDay(@Param("param") MonitorAlertCountParam param, @Param("moduleProjects") List<String> moduleProjects);

    Page<MonitorRecord> getMonitorRecordPage(@Param("startDate") String startDate,
                                             @Param("endDate") String endDate,
                                             @Param("deviceStatusAlert") Integer deviceStatusAlert,
                                             @Param("deviceId") String deviceId,
                                             @Param("moduleProjects") List<String> moduleProjects,
                                             Page<MonitorRecord> page);

    Page<MonitorRecord> getRecordPage(@Param("moduleName")String moduleName,@Param("projectName")String projectName, @Param("areaName")String areaName, @Param("serialNumber") String serialNumber, Page<MonitorRecord> page);

    MonitorRecord getRecordById(String recordId);
}
